home *** CD-ROM | disk | FTP | other *** search
- /*
- build_maxmin: build a max/min format for the parser.
-
- Kenneth Ingham
-
- Cpyright (C) 1988 The Univversity of New Mexico
- */
-
- #include "defs.h"
- #include "y.tab.h"
-
- struct change_fmt_st *
- build_maxmin(string, min, max)
- struct number *max, *min;
- char *string;
- {
- struct change_fmt_st *p;
-
- p = allocate(struct change_fmt_st);
- p->name = string;
- p->fmt.fmt.max_min.max = max->type == INTEGER ?
- (double)max->value.integer : max->value.real;
- p->fmt.fmt.max_min.min = min->type == INTEGER ?
- (double)min->value.integer : min->value.real;
- p->fmt.type = MAX_MIN;
-
- return p;
- }
-